import React, { Component } from 'react'
import { Form, Input,Space,Row,Col,Select,Cascader } from 'antd';


const { Option } = Select;
const { TextArea } = Input;

const options=[
    {
        label:"[1111]佛山徐福记-测试",
        value:"01"
    },
    {
        label:"[2222]佛山徐福记-测试",
        value:"02"
    },
    {
        label:"[3333]佛山徐福记-测试",
        value:"03"
    },
    {
        label:"[4444]佛山徐福记-测试",
        value:"04"
    },
    {
        label:"[5555]佛山徐福记-测试",
        value:"05"
    },
    {
        label:"[6666]佛山徐福记-测试",
        value:"06"
    },
]
  const layout = {
    labelCol: { span: 6 },
    wrapperCol: { span: 12 },
  };

export default class FormPage extends Component{
    render() {
        return (
            <div style={{padding:'2% 8%'}}>
                <Form
                {...layout}
                name="basic"
                >
                    <div>
                    <label className="antd-broderLeftBlue" style={{left:90}}>&nbsp;</label>
                        <div  style={{height:'20px'}}>
                            <span>基本信息</span>
                        </div>
                        <Row>
                            <Col span={12}>
                                <Form.Item 
                                    label="代码"
                                    name="code"
                                    rules={[{ required: true, message: '请输入代码'}]}
                                >
                                    <Input placeholder="请输入代码"/>
                                </Form.Item>
                            </Col>
                            <Col span={12}>
                                <Form.Item
                                    label="名称"
                                    name="name"
                                    rules={[{ required: true, message: '请输入名称'}]}
                                >
                                    <Input placeholder='请输入名称'/>
                                </Form.Item>
                            </Col>
                        </Row>
                        <Row>
                            <Col span={12}>
                                <Form.Item
                                    label="上游仓位代码"
                                    name="shortName"
                                    rules={[{ required: true, message: '请输入上游仓位代码'}]}
                                >
                                    <Input placeholder='请输入上游仓位代码'/>
                                </Form.Item>
                            </Col>
                            <Col span={12}>
                                <Form.Item
                                    label="上游仓位名称"
                                    name="owner"
                                    rules={[{ required: false, message: '请输入上游仓位名称'}]}
                                >
                                     <Input placeholder='请输入上游仓位代码'/>
                                    
                                </Form.Item>
                            </Col>
                        </Row>
                        <Row>
                            <Col span={12}>
                                <Form.Item
                                    label="配送中心"
                                    name="contactor"
                                    rules={[{ required: true, message: '请选择配送中心'}]}
                                >
                                    <Select defaultValue="" options={options}>
                                        
                                    </Select>
                                </Form.Item>
                            </Col>
                        </Row>
                        <label className="antd-broderLeftBlue" style={{left:90}}>&nbsp;</label>
                        <div style={{height:'20px'}}>
                            <span>备注</span>
                        </div>
                        <div style={{width:'95%',marginLeft:'30px'}}>
                            <Row>
                                <Col span={24} >
                                    <Form.Item
                                        wrapperCol={{span:24}}
                                        name="note"
                                        rules={[{ required: false, message: '请输入备注'}]}
                                        >
                                        <TextArea autoSize={{ minRows: 4, maxRows: 12 }} style={{width:'100%'}} placeholder='请输入备注'></TextArea>
                                    </Form.Item>
                                </Col>
                            </Row>
                        </div>
                    </div>
                </Form>
            </div>
        )
    }
}
